home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / bin / gnome-terminal.wrapper < prev    next >
Encoding:
Text File  |  2007-03-13  |  1.2 KB  |  72 lines

  1. #! /usr/bin/perl -w
  2.  
  3. my $login=0;
  4.  
  5. while ($opt = shift(@ARGV))
  6. {
  7.     if ($opt eq '-display')
  8.     {
  9.     $ENV{'DISPLAY'} = shift(@ARGV);
  10.     }
  11.     elsif ($opt eq '-name')
  12.     {
  13.     $arg = shift(@ARGV);
  14.     push(@args, "--tclass=$arg", '-t', $arg);
  15.     }
  16.     elsif ($opt eq '-n')
  17.     {
  18.     push(@args, '--icon', shift(@ARGV));
  19.     }
  20.     elsif ($opt eq '-T' || $opt eq '-title')
  21.     {
  22.     push(@args, '-t', shift(@ARGV));
  23.     }
  24.     elsif ($opt eq '-ls')
  25.     {
  26.     $login = 1;
  27.     }
  28.     elsif ($opt eq '+ls')
  29.     {
  30.     $login = 0;
  31.     }
  32.     elsif ($opt eq '-geometry')
  33.     {
  34.     $arg = shift(@ARGV);
  35.     push(@args, "--geometry=$arg");
  36.     }
  37.     elsif ($opt eq '-fn')
  38.     {
  39.     $arg = shift(@ARGV);
  40.     push(@args, "--font=$arg");
  41.     }
  42.     elsif ($opt eq '-fg')
  43.     {
  44.     $arg = shift(@ARGV);
  45.     push(@args, "--foreground=$arg");
  46.     }
  47.     elsif ($opt eq '-bg')
  48.     {
  49.     $arg = shift(@ARGV);
  50.     push(@args, "--background=$arg");
  51.     }
  52.     elsif ($opt eq '-tn')
  53.     {
  54.     $arg = shift(@ARGV);
  55.     push(@args, "--termname=$arg");
  56.     }
  57.     elsif ($opt eq '-e')
  58.     {
  59.     push(@args, '-x', @ARGV);
  60.     last;
  61.     }
  62.     elsif ($opt eq '-h' || $opt eq '--help')
  63.     {
  64.     push(@args, '--help');
  65.     }
  66. }
  67. if ($login == 1)
  68. {
  69.     @args = ('--login', @args);
  70. }
  71. exec('gnome-terminal',@args);
  72.